package com.words.dao;

import com.words.entity.Role;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface RoleDao {
    @Select("SELECT * FROM role WHERE id = #{id}")
    Role selectById(Integer id);

    @Select("select * from role where id = #{id}")
    List<Role> listByUserId(@Param("id") int id);
}
